﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace HexagonWeb.Models
{
    public class Airline
    {
        public int ID { get; set; }

        [Display(Name = "航班号")]
        public string Num { get; set; }

        [Display(Name = "起始地区")]
        public string EscapeDistrict { get; set; }

        [Display(Name = "终点地区")]
        public string ArriveDistrict { get; set; }

        [Display(Name = "出发日期")]
        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime WeekDay { get; set; }

        [Display(Name = "飞机类型")]
        public int Type { get; set; }

        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0: HH:mm}", ApplyFormatInEditMode = true)]
        [Display(Name = "出发时间")]
        public DateTime EscapeTime { get; set; }

        [DisplayFormat(DataFormatString = "{0: HH:mm}", ApplyFormatInEditMode = true)]
        [Display(Name = "到达时间")]
        public DateTime ArriveTime { get; set; }
 
        [Column(TypeName = "Money")]
        [Display(Name = "最高等级")]
        public decimal TopCost { get; set; }

        [Column(TypeName = "Money")]
        [Display(Name = "商业等级")]
        public decimal MidCost { get; set; }

        [Column(TypeName = "Money")]
        [Display(Name = "经济等级")]
        public decimal LowCost { get; set; }


        public class AirlineModelDbContext : DbContext{
            public DbSet<Airline> Airlines { get; set; }
        }
            
    }
}